import Vue from 'vue'

function changStr(str) {
  return str.charAt(0).toUpperCase() + str.slice(1)
}

export function startLoad() {
  let requireContext = require.context('@/components/HomeCard', true, /\w.(vue)/)
  requireContext.keys().forEach(item => {
    Vue.component(changStr(item.replace(/\.\//, '').replace(/\.vue$/, '')), requireContext(item).default)
  })
}
